package com.foreknow.demo4;

public class Dog extends Pet{
    @Override
    public void cure() {
        if (this.getHealth() < 50) {
            this.setHealth(60);
            System.out.println("吃药......");
        }
    }

    @Override
    public void eat() {
        System.out.println("1111111111111111111111111");
    }

    public void run(){
        System.out.println("run......");
    }

    //    public void cure(Pet pet) {
//        if (pet.getHealth() < 50) {
//            pet.toHospital();
//            System.out.println("吃药......");
//        }
//    }
}
